Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Integrate Grapical Modeler into single window layout #3003

Merged
merged 57 commits into from
Apr 9, 2024

Conversation

landam
Copy link
Member

@landam landam commented Jun 4, 2023

Screencast.from.2023-11-08.12-05-31.webm

Implemeneted:

  • graphical modeler opens in main notebook when single layout enabled
  • dock/undock icon added into toolbar
  • title set correctly on model changed
  • modeler settings replaced by new icon to avoid confusion with GUI settings icon
    modeler-settings
  • new icon added into toolbar to allow setting model properties (this functionality was available only from the menu)
    options

Not implemented (will be solved in subsequent PRs):

  • menu not shown (could be integrated in the main menu as a new "Modeler" item)

Related changes in API:

  • gmodeler code refactored (new modules canvas and panels)
  • display/map like classes/methods/variables renamed (eg. MapNotebook renamed to MainNotebook, ...)

@landam landam marked this pull request as draft June 4, 2023 09:40
@landam landam added this to the 8.4.0 milestone Jun 4, 2023
@landam landam added the GUI wxGUI related label Jun 4, 2023
@landam landam self-assigned this Jun 4, 2023
@wenzeslaus wenzeslaus changed the title Integrate Grapical Modeler into single window layout wxGUI: Integrate Grapical Modeler into single window layout Jun 6, 2023
@landam landam marked this pull request as ready for review November 8, 2023 11:18
petrasovaa
petrasovaa previously approved these changes Apr 3, 2024
pesekon2
pesekon2 previously approved these changes Apr 3, 2024
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are some other missing imports:

gmodeler/canvas.py:170:23: F405 'GUI' may be undefined, or defined from star imports: gmodeler.dialogs, gmodeler.model
gmodeler/canvas.py:173:24: F405 'GraphicalModelerGrassInterface' may be undefined, or defined from star imports: gmodeler.dialogs, gmodeler.model

and there are more probably...
It would be a good idea to get rid of the star imports and test flake8 on this.

@landam
Copy link
Member Author

landam commented Apr 5, 2024

and there are more probably... It would be a good idea to get rid of the star imports and test flake8 on this.

Addressed by cd78874

@petrasovaa
Copy link
Contributor

and there are more probably... It would be a good idea to get rid of the star imports and test flake8 on this.

Addressed by cd78874

Thanks, it would be good idea to remove the ignored errors from the .flake8 config file.

@landam
Copy link
Member Author

landam commented Apr 5, 2024

Thanks, it would be good idea to remove the ignored errors from the .flake8 config file.

Yes, done in c1c010f

@pesekon2
Copy link
Contributor

pesekon2 commented Apr 6, 2024

When I open the modeler in the single-window layout, I have some issue with the gmodeler icons. They seem invisible until I drag the mouse over them (see the attached screencast). When I click on another window, all of them appear.

Screencast.from.6.4.2024.13.59.55.webm

@landam @petrasovaa: Does it happen to you in this PR too? It might be just my local issue so if you don't encounter this problem, I will not block the PR and try to find the solution myself later.

@landam
Copy link
Member Author

landam commented Apr 6, 2024

@landam @petrasovaa: Does it happen to you in this PR too? It might be just my local issue so if you don't encounter this problem, I will not block the PR and try to find the solution myself later.

Thanks for testing. I am not aware of this issue, it never happened to me. See screencast below.

Screencast.from.2024-04-06.20-33-29.webm

In your screencast I also don't see any tabs. So it seems that also other widgets from the gmodeler panel have the same issue.

@pesekon2 Which wxPython version do you have?

@pesekon2
Copy link
Contributor

pesekon2 commented Apr 6, 2024

In your screencast I also don't see any tabs. So it seems that also other widgets from the gmodeler panel have the same issue.

You are right. I see the same behaviour in tabs. They all appear at once once I go there with the mouse there.

Which wxPython version do you have?

4.2.1. It should be the newest version. Python 3.10.12.

@landam
Copy link
Member Author

landam commented Apr 7, 2024

4.2.1. It should be the newest version. Python 3.10.12.

No clue.

Python: 3.11.8
wxPython: 4.2.1

@pesekon2
Copy link
Contributor

pesekon2 commented Apr 7, 2024

No clue.

Python: 3.11.8 wxPython: 4.2.1

Then if nobody else encounters the same issue, I will assume it is a problem at my side. I will not block this PR then (but cannot approve either, as I don't see the same weird behaviour in the old-school gmodeler).

I didn't find any other issue with the PR.

@landam
Copy link
Member Author

landam commented Apr 7, 2024

Python: 3.11.8 wxPython: 4.2.1

I also tested this PR (university GIS.lab solution) on Python 3.10.12 (with wxPython 4.2.1). No problem detected. So it's mystery to me.

@petrasovaa
Copy link
Contributor

Python: 3.11.8 wxPython: 4.2.1

I also tested this PR (university GIS.lab solution) on Python 3.10.12 (with wxPython 4.2.1). No problem detected. So it's mystery to me.

It works for me as well (Ubuntu wxPython 4.2.0, Python 3.11.4). I have seen this behavior before, but it's a mystery to me as well.

@landam landam dismissed lindakarlovska’s stale review April 9, 2024 09:40

Since your review the PR changed significantly.

@landam landam merged commit e61e86a into OSGeo:main Apr 9, 2024
26 checks passed
@landam landam deleted the gmodeler_panel branch April 9, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs GUI wxGUI related Python Related code is in Python
Development

Successfully merging this pull request may close these issues.

5 participants